#ifndef YUAN_MQTT_H
#define YUAN_MQTT_H

#include "MQTTClient.h"

#define YUAN_ADDRESS         "tcp://mqtt.yyzlab.com.cn:1883"  // 服务器地址
#define YUAN_PUB_CLIENT      "ExampleClientPub"          // 发布端客户端ID
#define YUAN_SUB_CLIENT      "ExampleClientSub"          // 订阅端客户端ID
#define YUAN_PUB_TOPIC       "1762399185573/AIOTSIM2Device"         // 数据上报主题
#define YUAN_SUB_TOPIC       "1762399185573/Device2AIOTSIM"         // 控制指令主题
#define YUAN_QOS        1                                // 服务质量等级
#define YUAN_TIMEOUT    10000L                           // 超时时间（毫秒）

void yuan_delivered(void *context, MQTTClient_deliveryToken dt);
int yuan_msgarrvd(void *context, char *topicName, int topicLen, MQTTClient_message *message);
void yuan_connlost(void *context, char *cause);

int yuan_mqtt_publish(MQTTClient client, const char* payload);


#endif

